package eerbaar.v2.pattern.client.internal.teach;

import eerbaar.v2.menu.MenuItem;

public class TeachMenu extends MenuItem {

    final TeachingCommand command = new TeachingCommand();

    public TeachMenu() {
        super("Teach");
    }

    @Override
    public void execute() {
        this.command.execute();
    }

    public TeachingCommand getCommand() {
        return this.command;
    }

    @Override
    public boolean isRunning() {

        TeachingMediator mediator = TeachingMediator.getInstance();
        if (mediator.getState() == TeachingState.TEACHING) {
            return true;
        }
        return false;
    }

}
